package com.situ.study.day7;

import java.util.Arrays;
import java.util.Scanner;

public class Student {
    int id;//0
    double salary;//0.0
    boolean flag;//false
    //所有引用类型的默认值都是null
    String name;//null
    int[] scores;//null
    Scanner scanner;
    Math math;

    public void show() {
        System.out.println("Student.show");
    }


    public static void main(String[] args) {
        Student student = new Student();
        System.out.println(student.id);
        System.out.println(student.salary);
        System.out.println(student.flag);
        System.out.println(student.name);
        System.out.println(student.scores);

        int[] array1 = new int[3];
        for (int i = 0; i < array1.length; i++) {
            System.out.print(array1[i] + "  ");
        }
        array1[0] = 23;
        array1[1] = 1;
        array1[2] = 34;

        boolean[] array2 = new boolean[3];
        for (int i = 0; i < array2.length; i++) {
            System.out.print(array2[i] + "  ");
        }

        Student[] array3 = new Student[3];
        for (int i = 0; i < array3.length; i++) {
            System.out.print(array3[i] + "  ");
        }
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", salary=" + salary +
                ", flag=" + flag +
                ", name='" + name + '\'' +
                ", scores=" + Arrays.toString(scores) +
                ", scanner=" + scanner +
                ", math=" + math +
                '}';
    }
}
